package zhuoyue.com.yanjiaohui.util;

import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

import ezy.ui.view.BannerView;
import zhuoyue.com.yanjiaohui.entity.BannerItem;
import zhuoyue.com.yanjiaohui.entity.Picature;

/**
 * Created by ShellJor on 2017/4/28 0028.
 * at 13:11
 */

public  class BannerViewFactory implements BannerView.ViewFactory<BannerItem>{
    @Override
    public View create(BannerItem bannerItem, int position, ViewGroup container) {
        ImageView imageView = new ImageView(container.getContext());
        Glide.with(container.getContext().getApplicationContext())
                .load(bannerItem.image)
                .into(imageView);

        return imageView;
    }
}
